<#include "/public/macro.html">
<div class="uk-layui-form">
	<form class="layui-form uk-form" action="/apps/contacts/item/update.html">
	  <input type="hidden" name="id" value="${contactsItem.id!''}">
	  <input type="hidden" name="itemid" value="${itemid!''}">
	  <div class="layui-form-item">
	    <label class="layui-form-label">名称：</label>
	    <div class="layui-input-inline">
	      <input type="text" name="name" value="${contactsItem.name!''}" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	 <!--  <div class="layui-form-item">
	    <label class="layui-form-label">类型：</label>
	    <div class="layui-input-inline">
	      <select  name="type"  lay-verify="required">
			<#list uKeFuDic['com.dic.contacts.ckind'] as macroSysDic>
			<option value="<#if macroSysDic.discode>${macroSysDic.code}<#else>${macroSysDic.id}</#if>" <#if value?? && macroSysDic?? && (macroSysDic.id == value || macroSysDic.code == value)>selected="selected"</#if>>${macroSysDic.name!''}</option>
			</#list>
		 </select>     
	    </div>
	  </div> -->
	  <#if contactsItem?? && contactsItem.parentid?? && contactsItem.parentid!='' >
	  <div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">上级项目：</label>
			<div class="layui-input-inline" style="position: relative;">
				 <select name="parentid" >
			        <option value="">不选默认为创建项目</option>
			       	<#if contactsItemList?? && contactsItemList?size gt 0>
						<#list contactsItemList as item>
							<#if !item.parentid?? || item.parentid=='' || item.parentid=='0'>
								<option value="${item.id!''}" <#if contactsItem?? && contactsItem.itemid==item.id && contactsItem.parentid?? && contactsItem.parentid!=''>selected</#if>>${item.name!''}</option>
							</#if>
						</#list>			       	
			       	</#if>	
			      </select>
			</div>
		</div>
	  </div>
	  <div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">状态类型：</label>
			<div class="layui-input-inline" style="position: relative;">
			 	<@select "com.dic.callout.activity" "statuscode" contactsItem.statuscode!'' "lay-ignore" "width: 100%;"/>
			</div>
		</div>
	  </div>
	  </#if>
	  <div class="layui-form-button">
	    <div class="layui-button-block">
	      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	</form>
</div>
 
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  form.render(); //更新全部
});
</script>
